<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui">
    <h:body>
        <div class="change_pass">
            <div class="cn">
                <h3 style="color: #3F8AAC; margin: 5px 0 0 115px;">Account Details</h3>
                <p style=" margin-left: 5px;">Fields marked with <i style="color: red;">*</i> are required. <br/>Click 'Save' after you have finished making the changes.</p>
                <form name="form_Profile" id="" action="#" method="post">
                    <table style="margin-left: 30px;">
                        <h:form>
                            <script type="text/javascript">
                                function confirmation() {
                                      var answer = confirm("Do you want save?")
                                      if (answer){
                                          return true;
                                      }
                                      else{
                                          return false;
                                      }
                                }
                            </script>
                            <tbody>
                                <tr>
                                    <td style="text-align: right;">Name<i style="color: red;"> * </i>&nbsp;:</td>
                                    <td>
                                        <p:inplace>
                                            <p:inputText value="#{employeeManagedBean.emp.empName}" />
                                        </p:inplace>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="text-align: right;">Address<i style="color: red;"> * </i>&nbsp;:</td>
                                    <td>
                                        <p:inplace>
                                            <p:inputText value="#{employeeManagedBean.emp.address}" />
                                        </p:inplace>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="text-align: right;">Phone<i style="color: red;"> * </i>&nbsp;:</td>
                                    <td>
                                        <p:inplace>
                                            <p:inputText value="#{employeeManagedBean.emp.phone}" />
                                        </p:inplace>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="text-align: right;">E-mail<i style="color: red;"> * </i>&nbsp;:</td>
                                    <td>
                                        <p:inplace>
                                            <p:inputText value="#{employeeManagedBean.emp.email}" />
                                        </p:inplace>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="text-align: right;" ></td>
                                    <td>
                                        <h:commandButton value="Save" onclick="return confirmation()" action="#{employeeManagedBean.changeProfileEm}"/>
                                    </td>
                                </tr>
                            </tbody>
                        </h:form>
                    </table>
                </form>
            </div>
        </div>
    </h:body>
</html>

